package bing.commons.json.yaml2json;

import java.io.File;
import java.io.IOException;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;

public class Yaml2Json {

	private static ObjectMapper mapper = new ObjectMapper(new YAMLFactory());

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		File yamlFile=new File("C:/Users/LBH/git/commonfile-tool/src/main/java/bing/commons/json/yaml2json/atlasdb1.yml");
		JsonNode rootNode=mapper.readTree(yamlFile);
		
		JsonNode weaNode = rootNode.get("type");  
        System.out.println(weaNode);  
	}

}
